<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateComboActivitiesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('combo_activities', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('sort')->nullable();
			$table->string('title')->nullable()->comment('活动名称');
			$table->string('thumb')->nullable()->comment('封面');
			$table->boolean('type')->nullable()->comment('活动方式1折扣2减免价格');
			$table->decimal('reduce', 9, 0)->nullable()->comment('减免价格');
			$table->float('rebate', 10, 0)->nullable()->comment('折扣');
			$table->boolean('rate_type')->nullable()->comment('1按套餐2自定义');
			$table->float('rate', 10, 0)->nullable()->comment('返利');
			$table->float('top_rate', 10, 0)->nullable();
			$table->string('desc')->nullable()->comment('描述');
			$table->text('content', 65535)->nullable()->comment('详情');
			$table->dateTime('start_time')->nullable()->comment('开始时间');
			$table->dateTime('end_time')->nullable()->comment('结束时间');
			$table->boolean('status')->nullable()->comment('是否启用1是2否');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('combo_activities');
	}

}
